﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@model sipfe.model.dataAccess.SIPMaePersona
@using Resources;
@using sipfe.util;
@{   
    Layout = "~/Views/Shared/Layaout/general/_LayoutPopGeneral.cshtml";        
}

<script type="text/javascript" language="javascript" src="@Url.Content(@properties.nuevoJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.personaJS)" ></script>

<script type="text/javascript">
    $(function () {
        calendarFechaFuturo('fecIniVinculo', '1');
        calendarFechaFuturo('fecFinVinculo', '1');
        
        //calendarioFechaNac('dtFecNacim');
    });
    
</script>
<br/>
@using (Html.BeginForm("AddNuevaPersonaPoPup", "DatosPersonales", FormMethod.Post))
{
    @Html.ValidationSummary(true)
<fieldset style="width: 760px;" class="fieldsetStyle1">
    <legend class="tituloBlue9">Registrar Nueva Persona Jurídica</legend>
    <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0">
        <tbody>
            <tr>                
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tbody class="tituloCelesteN8">
                        <tr>
                            <td>País Emisor</td>
                            <td>Tipo documento</td>
                            <td>Núm. documento</td>                            
                            <td>Razón Social</td
                        </tr>
                        <tr>
                            <td>
                                @Html.DropDownList("nIdeCodPaisDoc", (IEnumerable<SelectListItem>)ViewBag.PaisEmisor, "--Seleccione--", new { @class = "select8" })                                 
		                    </td>                            
                            <td>
                                @Html.DropDownList("nIdeTipoDocum", (IEnumerable<SelectListItem>)ViewBag.TipoDocIdent, "--Seleccione--", new { @class = "select8" })                                
		                    </td>
                            <td>@Html.TextBoxFor(model => model.vNumDocum, new {style="width:80px;text-transform:none;", maxlength=20, onkeypress = "return validaAlfaNumTamanio(this,event,20);", onpaste = "return false;",onblur = "javascript:onBlurUpper(this); validaDNIPersona(this);" }) 
                               
		                    </td>
                            <td>
                                @Html.TextBoxFor(model => model.vPriNombre, new {style="width:420px;", maxlength=120 }) 
                                @Html.ValidationMessageFor(model => model.vPriNombre)
		                    </td>                           
                        </tr>
                        <tr xalign="center">
                            <td>Vínculo</td>
                            <td>Fecha Inicio Vínculo</td>
                            <td>Fecha Fin Vínculo</td>
                            <td>Correo Electrónico</td>
                        </tr>
                        <tr>
                            <td>
                                @Html.DropDownListFor(model => model.SIPDetEstadoCivil1.nIdeEstadoCivil, (IEnumerable<SelectListItem>)ViewBag.EstadoCivil, "--Seleccione--", new { @class = "select8" }) 
                                @Html.ValidationMessageFor(model => model.SIPDetEstadoCivil1.nIdeEstadoCivil)
		                    </td>
                            <td>
                                <input type="text" id="fecIniVinculo" name="fecIniVinculo"  style="width:70px;"  />
                            </td>
                            <td>
                                <input type="text" id="fecFinVinculo" name="fecIniVinculo"  style="width:70px;"  />
                            </td>
                            <td>
                               <table border="0" cellpadding="0" cellspacing="0" xwidth="100%">
                                   <tr>
                                       <td><input type="text" id="correoElectronico" name="correoElectronico"  style="width:420px;"  /></td>
                                       <td id="tdCorreo">
                                           <img src="@Url.Content("~/images/borrar.gif")" class="lupita2" alt="ELIMINAR" id="imgBorrar" style="display:none" onclick="javascript:deleteRowCorreo(this);"   />
                                           <img src="@Url.Content("~/images/mas.gif")" class="lupita2" alt="AGREGAR"  id="imgAgregar" onclick="javascript:clonarTablaEmailEmpresa(this,'tdCorreo');"/>
                                       </td>
                                   </tr>
                               </table>
		                    </td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                <tbody class="tituloCelesteN8">
                                    <tr>
                                        <td style="width:5%">
                                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                            <tbody class="tituloCelesteN8">
                                                <tr>
                                                    <td>Prefijo</td>
                                                    <td>Número telefonico</td>
                                                </tr>
                                            </tbody>
                                            </table>
                                        </td>
                                        <td style="width:20px;">&nbsp;</td>                                        
                                        <td style="width:40%">Actividad Principal</td>
                                        <td style="width:40%">Actividad Secundaria</td>
                                    </tr>
                                    <tr>
                                       <td valign="top">
                                           <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                            <tbody class="tituloCelesteN8">                                                
                                                <tr>
                                                    <td><input type="text" id="vNumDocumento" name="vNumDocumento"  style="width:30px;"  /></td>
                                                    <td>-</td>
                                                    <td><input type="text" id="vNumDocumento" name="vNumDocumento"  style="width:100px;"  /></td>
                                                    <td id="tdTelefono">
                                                       <img src="@Url.Content("~/images/borrar.gif")" class="lupita2" alt="ELIMINAR" id="imgBorrarTel" style="display:none" onclick="javascript:deleteRowCorreo(this);"   />
                                                       <img src="@Url.Content("~/images/mas.gif")" class="lupita2" alt="AGREGAR"  id="imgAgregarTel" onclick="javascript:clonarTablaTelefono(this,'tdTelefono');"/>
                                                   </td>
                                                </tr>
                                            </tbody>
                                            </table>
                                       </td>
                                        <td valign="top">&nbsp;</td>
                                       <td valign="top"><input type="text" id="vNumDocumento" name="vNumDocumento"  style="width:285px;"  /></td>
                                       <td valign="top"><input type="text" id="vNumDocumento" name="vNumDocumento"  style="width:270px;"  /></td>
                                    </tr>
                                </tbody>
                                </table>
                            </td>
                        </tr>
                    </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
</fieldset>
    @Html.Hidden("nIdeTipoPer",Constante.getInstance().N_IDE_DETALLE_TIPO_PERSONA_INTERNA)
    @Html.Hidden("nIdeUsuReg",@Session[Constante.N_IDE_USUARIO])
    @Html.Hidden("dtFecReg", @DateTime.Now.ToString())

    @Html.Hidden("SIPDetEstadoCivil1.dFecIniVig", @DateTime.Now.ToString())
    @Html.Hidden("SIPDetEstadoCivil1.nIdeUsuReg", @Session[Constante.N_IDE_USUARIO])

@Html.ValidationMessageFor(model => model.nIdeCodPaisDoc)
@Html.ValidationMessageFor(model => model.nIdeTipoDocum)
 @Html.ValidationMessageFor(model => model.vNumDocum)
<br />
<fieldset style="width: 760px;" class="fieldsetStyle1">
    <legend class="tituloBlue9">Registrar Dirección de la Empresa</legend>
    <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0">
        <tbody>
            <tr>
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" class="tituloCelesteN8">
                        <tr>
                            <td>Tipo de Vía</td>
                            <td style="width: 10px;">&nbsp;</td>
                            <td>Nombre de la Vía</td>
                            <td style="width: 10px;">&nbsp;</td>
                            <td># Puerta</td>
                            <td>&nbsp;</td>
                            <td>Letra</td>
                        </tr>
                        <tr>
                            <td>
                                <select id="nIdePais" name="nIdePais" style="width: 150px;">
                                    <option value="73">--Selecione--</option>
                                    <option value="73">CARRETERA</option>
                                    <option value="73">CALLE</option>
                                    <option value="73">JIRON</option>
                                </select>
                            </td>
                            <td>&nbsp;</td>
                            <td>
                                <input type="text" id="vNumDocumento" name="vNumDocumento" style="width: 320px;" />
                            </td>
                            <td>&nbsp;</td>
                            <td>
                                <input type="text" id="fechaNac1" name="fechaNac1" style="width: 50px;" />
                            </td>
                            <td align="center">-</td>
                            <td>
                                <input type="text" id="fechaNac2" name="fechaNac2" style="width: 30px;" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr><td>&nbsp;</td></tr>
            <tr>
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" class="tituloCelesteN8">
                        <tr>
                            <td>Tipo de Zona</td>
                            <td style="width:10px;">&nbsp;</td> 
                            <td colspan="2">Nombre de la Zona</td>                            
                            <td style="width:10px;">&nbsp;</td>                          
                            <td>Centro Poblado</td>
                        </tr>
                        <tr>
                            <td>
                                <select id="nIdePais" name="nIdePais" style="width:150px;">
                                    <option value="73">--Selecione--</option>
                                    <option value="73">URBANIZACION</option>
                                    <option value="73">PUEBLO JOVEN</option>
                                    <option value="73">UNIDAD VECINAL</option>
                                    <option value="73">CONJUNTO HABITACIONAL</option>
                                </select>
                            </td>
                            <td>&nbsp;</td>                           
                            <td colspan="2">
                                <input type="text"   id="vNumDocumento" name="vNumDocumento"  style="width:320px;"  />
                            </td>
                            <td>&nbsp;</td>                           
                            <td>
                                <input type="text"   id="fechaNac4" name="fechaNac4"  style="width:140px;"  />
                            </td>                                                        
                        </tr>
                    </table>
                </td>
            </tr>
            <tr><td>&nbsp;</td></tr>
            <tr>
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" style="width:100%;" class="tituloCelesteN8">
                        <tr>
                            <td style="width:40px;">Block</td>
                            <td style="width:40px;">Piso</td>
                            <td style="width:60px;">Interior</td>
                            <td style="width:60px;">Manzana</td>
                            <td style="width:60px;">Lote</td>
                            <td style="width:70px;">Kilometro</td>
                            <td>Referencia</td>
                        </tr>
                        <tr>
                            <td>
                                <input type="text"   id="vNumDocumento" name="vNumDocumento"  style="width:30px;"  />
                            </td>
                            <td>
                                <input type="text"   id="vNumDocumento" name="vNumDocumento" style="width:20px;"   />
                            </td>
                            <td>
                                <input type="text"   id="vNumDocumento" name="vNumDocumento"  style="width:40px;"   />
                            </td>
                            <td>
                                <input type="text"   id="vNumDocumento" name="vNumDocumento"  style="width:40px;"   />
                            </td>
                            <td>
                                <input type="text"   id="vNumDocumento" name="vNumDocumento"  style="width:40px;"   />
                            </td>
                            <td>
                                <input type="text"   id="vNumDocumento" name="vNumDocumento"  style="width:40px;"   />
                            </td>
                            <td>
                                <textarea rows="2" cols="90" style="width:430px;"  ></textarea>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr><td>&nbsp;</td></tr>
            <tr>
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" style="width:760px;" class="tituloCelesteN8">
                        <tr>                           
                            <td>Región / Departamento</td>
                            <td>Provincia</td>
                            <td>Distrito</td>
                            <td>Zonificación Distrital</td>
                        </tr>
                        <tr xalign="center">
                            <td>
                                <select id="nIdePais" name="nIdePais" style="width:120px;">
                                    <option value="37">--Seleccione--</option>
                                    <option value="73">PERU</option>
                                </select>
                            </td>
                            <td>
                                <select id="nIdePais" name="nIdePais" style="width:120px;">
                                    <option value="73">Tumbes</option>
                                </select>
                            </td>
                            <td>
                                <select id="nIdePais" name="nIdePais" style="width:120px;">
                                    <option value="73">Tumbes</option>
                                </select>
                            </td>
                            <td>
                                <select id="nIdePais" name="nIdePais" style="width:120px;">
                                    <option value="73">Tumbes</option>
                                </select>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
</fieldset>    
    <br/>
    <fieldset style="width: 760px;" class="fieldsetStyle1">
        <legend class="tituloBlue9">Registrar Datos de Contacto</legend>
        <table border="1" cellpadding="3" cellspacing="0" width="100%" id="tula2" class="tablaDetalle1">
            <tr id="trDuplicar">
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tbody class="tituloCelesteN8">
                            <tr align="center">
                                <td>País Emisor</td>
                                <td>Tipo documento</td>
                                <td>Número documento</td>
                                <td>Nombres</td>                                
                                <td colspan="2">&nbsp;</td>
                            </tr>
                            <tr align="center">
                                <td>
                                    @Html.DropDownList("nIdeCodPaisDoc", (IEnumerable<SelectListItem>)ViewBag.PaisEmisor, "--Seleccione--", new { @class = "select8" })
                                </td>
                                <td>
                                    @Html.DropDownList("nIdeTipoDocum", (IEnumerable<SelectListItem>)ViewBag.TipoDocIdent, "--Seleccione--", new { @class = "select8" })
                                </td>
                                <td>
                                    @Html.TextBox("nIdeTipoDocum", null, new { style = "width:100px;", maxlength = 120 })
                                </td>
                                <td>
                                    @Html.TextBox("vNombres", null, new { style = "width:300px;", maxlength = 120 })
                                </td>
                                <td id="tdContacto" align="right">
                                    <img src="@Url.Content("~/images/borrar.gif")" class="lupita2" alt="ELIMINAR" id="imgBorrar" style="display:none" onclick="javascript:deleteRowContacto(this);"   />
                                    <img src="@Url.Content("~/images/mas.gif")" class="lupita2" alt="AGREGAR"  id="imgAgregar" onclick="javascript:clonarTablaContacto(this,'tdContacto');"/>
                                </td>
                                <td>
                                    <img src="@Url.Content("~/images/newPerson.jpg")" class="lupita2"  onclick="javascript:addNuevaPersona(this);" />
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
        </table>
    </fieldset>
    <br />
    <center>    
        <input type="button" value="Registrar Datos" onclick="javascript: addNuevaPersonaFinal(this.form);" />
    </center>
}